package com.dx.service.impl;

import com.dx.domain.QaOperLog;
import com.github.pagehelper.PageHelper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import com.dx.mapper.LogMapper;
import com.dx.service.LogService;

import java.time.LocalDateTime;
import java.util.List;

@Service
@RequiredArgsConstructor
public class LogServiceImpl implements LogService {
    private final LogMapper logMapper;
    @Override
    public void add(QaOperLog log) {
        logMapper.add(log);
    }

    @Override
    public List<QaOperLog> list(String question, Long createdBy, LocalDateTime startTime, LocalDateTime endTime, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        return logMapper.list(question,createdBy,startTime,endTime);
    }

}
